package com.newsmanagement.service;


import com.newsmanagement.entity.ReturnedMessages;

import javax.servlet.http.HttpServletRequest;

/**
 * @author xbr
 * 2017/12/4 16:29
 * 新闻分类管理service实现
 */
public interface IEumService {

    /**
     * 添加用户
     * @param eumName 用户名称，可不填
     * @param mobilePhone 手机号码，必填
     * @param password 密码，可不填，默认会自动插入111111
     * @return ReturnedMessages
     */
    ReturnedMessages addEum(String eumName,String mobilePhone,String password);

    /**
     * 删除用户
     * @param id 用户id
     * @return ReturnedMessages
     */
    ReturnedMessages deleteEum(Long id);

    /**
     * 用户登录
     * @param request HttpServletRequest
     * @param mobilePhone 手机号码
     * @param password 密码
     * @return ReturnedMessages
     */
    ReturnedMessages login(HttpServletRequest request , String mobilePhone ,String password);

    /**
     * 设置用户对应角色
     * @param eumId 用户ID
     * @param roleId 角色ID
     * @return
     */
    ReturnedMessages eumToRole(Integer eumId, Integer roleId);

}
